<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Password
    </ui:define>

    <ui:define name="description">
        Password component is an extended version of standard inputSecret component with theme integration, strength indicator and match mode.
    </ui:define>

    <ui:param name="documentationLink" value="/components/password" />

    <ui:define name="implementation">

        <h:form>
            <h:panelGrid columns="2" cellpadding="5">
                <h:outputText value="Basic: " />
                <p:password id="nonFeedback" value="#{passwordView.password1}" />

                <h:outputText value="Feedback: " />
                <p:password id="feedback" value="#{passwordView.password2}" feedback="true" />

                <h:outputText value="Feedback (Turkish): " />
                <p:password id="turkishFeedback" value="#{passwordView.password3}" feedback="true" 
                            promptLabel="Lütfen şifre giriniz" weakLabel="Zayıf"
                            goodLabel="Orta seviye" strongLabel="Güçlü" />

                <h:outputText value="Inline Feedback: " />
                <p:password id="inlineFeedback" value="#{passwordView.password4}" feedback="true" inline="true" />
            </h:panelGrid>
            
            <p:spacer height="10" />
            
            <p:separator />
            
            <p:messages id="messages" showDetail="true" autoUpdate="true" />

            <h:panelGrid columns="2" id="matchGrid" cellpadding="5">                   
                <h:outputLabel for="pwd1" value="Password 1: *" />
                <p:password id="pwd1" value="#{passwordView.password5}" match="pwd2" label="Password 1" required="true" />

                <h:outputLabel for="pwd2" value="Password 2: *" />
                <p:password id="pwd2" value="#{passwordView.password5}" label="Password 2" required="true" />
            </h:panelGrid>

            <p:commandButton update="matchGrid" value="Save" />    
        </h:form>
        
    </ui:define>

</ui:composition>
